package com.easyjava.builder;

import com.easyjava.bean.Constants;
import com.easyjava.utils.DateUtils;

import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Date;

/**
 * @Author: 小闹心
 * @Description: 注释类，用于生成Builder注释
 * @DateTime: 2024/11/16 16:32
 **/
public class BuildComment {
    public static void createClassComment(BufferedWriter bw, String classComment) throws IOException {
//        /**
//         * @Author: 小闹心
//         * @Description: 注释类，用于生成Builder注释
//         * @DateTime: 2024/11/16 16:32
//         **/
        bw.write("/**");
        bw.newLine();
        bw.write(" * @Author: " + Constants.AUTHOR_COMMENT);
        bw.newLine();
        bw.write(" * @Description: " + classComment);
        bw.newLine();
        bw.write(" * @DateTime: " + DateUtils.format(new Date(),DateUtils.YYYY_MMDD));
        bw.newLine();
        bw.write(" **/");
        bw.newLine();
    }
    public static void createMethodComment() {

    }
    public static void createFieldComment(BufferedWriter bw, String fieldComment) throws IOException {
//        /**
//         * 类型   1 菜品分类 2 套餐分类
//         **/
        bw.write("\t/**");
        bw.newLine();
        bw.write("\t * " + fieldComment);
        bw.newLine();
        bw.write("\t **/");
        bw.newLine();
    }
}
